package com.basics.common.utils;

import com.basics.common.utils.spring.SpringUtils;
import org.springframework.context.MessageSource;

import java.util.Locale;

public class MessageUtils {
    public MessageUtils() {
    }

    public static String message(String code, Object... args) {
        MessageSource messageSource = (MessageSource) SpringUtils.getBean(MessageSource.class);
        return messageSource.getMessage(code, args, (Locale)null);
    }
}
